import sqlite3
import time

def AddUserRecord(userId,cameraId):
    conn=sqlite3.connect('test.db')
    c=conn.cursor()
    now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    sql = 'insert into sys_record(userId,time,cameraId) values(?,?,?)'
    c.execute(sql, (userId, now,cameraId))
    conn.commit()